#pragma once

#include "precompiled.h"
#include "Scene.h"

class Model;

class SceneStack
{
public:
	SceneStack(void);
	~SceneStack(void);

	// Push a Scene onto the stack. The new scene may need a few engine state
	// initializations/changes to take charge.
	void Push_On_Scene(Scene* pushed_on);

	// Pushes the last scene removed with Pop_Off_Scene_Save().
	// If there are no scenes to pop (only the root left) then returns false.
	bool Push_On_Scene_LastSaved();

	// Pops the current top of the Scene Stack off. Can return to the scene.
	// If there are no scenes to pop (only the root left) then returns false.
	bool Pop_Off_Scene_Save(Scene popped_off);

	// Pops the current top of the Scene Stack off. Cannot return to the scene.
	// If there are no scenes to pop (only the root left) then returns false.
	bool Pop_Off_Scene_Destroy(Scene popped_off);

	void Update_CurrentScene( GLdouble time );
	void Submit_CurrentScene( glm::mat4 &projview );
	glm::mat4* GetCurrentCamera();

	World_Manager* Get_CurrentWorld();

	void Load_FSQ();
	void Draw_FSQ();

	void Destroy();

private:

	std::stack<Scene*>	stack,			// Main scene stack.
						stack_saved;	// Saved scenes popped stack.

	Model *fsq;
};

